CREATE EXTERNAL TABLE jms_dwd.dwd_terminal_sign_all_detail_new_dt(
  `billcode` string COMMENT '运单号',
  `order_source_code` string COMMENT '订单来源编码,注:订单来源原始编码',
  `order_source_name` string COMMENT '订单来源编码,注:订单来源原始名称',
  `goods_type_code` string COMMENT '物品类型编码,注:物品类型原始编码',
  `goods_type_name` string COMMENT '物品类型名称,注:物品类型原始名称',
  `end_manage_region_code` string COMMENT '末端网点所属管理大区编码',
  `end_manage_region_name` string COMMENT '末端网点所属管理大区名称',
  `end_agent_code` string COMMENT '末端网点所属代理区编码',
  `end_agent_name` string COMMENT '末端网点所属代理区名称',
  `end_provider_id` int COMMENT '末端网点所属省份id',
  `end_provider_name` string COMMENT '末端网点所属省份名称',
  `end_city_id` int COMMENT '末端网点所属城市id',
  `end_city_name` string COMMENT '末端网点所属城市名称',
  `end_area_id` int COMMENT '末端网点所属区县id',
  `end_area_name` string COMMENT '末端网点所属区县名称',
  `end_franchisee_code` string COMMENT '末端网点所属加盟商编码',
  `end_franchisee_name` string COMMENT '末端网点所属加盟商名称',
  `end_center_code` string COMMENT '末端发件中心/集散编码',
  `end_center_name` string COMMENT '末端发件中心/集散名称',
  `end_center_send_time` string COMMENT '末端中心/集散发件时间',
  `send_next_station_code` string COMMENT '末端中心/集散发件下一站编码',
  `send_next_station_name` string COMMENT '末端中心/集散发件下一站名称',
  `final_sign_network_code` string COMMENT '规划签收网点编码',
  `final_sign_network_name` string COMMENT '规划签收网点名称',
  `final_plan_sign_time` string COMMENT '规划签收时间',
  `planned_delivery_time` string COMMENT '规划发件时间',
  `deadline_signing_time` string COMMENT '规划签收截止时间',
  `span_days_arrive` int COMMENT '跨越天数-到车',
  `out_line_day` int COMMENT '���线衔接跨天',
  `span_days_shift` int COMMENT '跨越天数-派件班次',
  `span_days_sign` int COMMENT '跨越天数-签收',
  `special_extra_time` double COMMENT '特殊乡镇加时(天)',
  `deliver_shift` int COMMENT '派件派仓班次',
  `end_network_code` string COMMENT '末端到件网点编码',
  `end_network_name` string COMMENT '末端到件网点名称',
  `end_network_arrival_time` string COMMENT '末端网点到件时间',
  `deliver_network_id` int COMMENT '出仓网点id',
  `deliver_network_code` string COMMENT '出仓网点编码',
  `deliver_network_name` string COMMENT '出仓网点名称',
  `deliver_time` string COMMENT '出仓时间',
  `deliver_user_code` string COMMENT '出仓派件员编码',
  `final_sign_user_code` string COMMENT '最后签收派件员编码',
  `final_sign_user_name` string COMMENT '最后签收派件员名称',
  `deliver_unrecordflag` int COMMENT '未录单标识',
  `deliver_township_id` int COMMENT '出仓乡镇id',
  `deliver_township_name` string COMMENT '出仓乡镇名称',
  `aging_sign_network_code` string COMMENT '时效签收网点编码',
  `aging_sign_network_name` string COMMENT '时效签收网点名称',
  `aging_sign_time` string COMMENT '时效签收时间',
  `aging_sign_scan_type` string COMMENT '时效签收扫描类型',
  `aging_sign_user_code` string COMMENT '时效签收派件员',
  `aging_sign_pistolid` string COMMENT '时效签收巴枪id 备注:PDD开头是桃花岛其他是自助对接',
  `is_aging_sign_pdd` int COMMENT '是否桃花岛认证 1 是 2 否',
  `actual_sign_network_code` string COMMENT '实际签收网点编码',
  `actual_sign_network_name` string COMMENT '实际签收网点名称',
  `actual_sign_time` string COMMENT '实际签收时间',
  `actual_sign_scan_type` string COMMENT '实际签收扫描类型',
  `actual_sign_user_code` string COMMENT '实际签收派件员',
  `proxy_in_network_code` string COMMENT '代理点收入网点编码',
  `proxy_in_network_name` string COMMENT '代理点收入网点名称',
  `proxy_in_time` string COMMENT '代理点收入扫描时间',
  `collect_in_network_code` string COMMENT '入库网点编码',
  `collect_in_time` string COMMENT '入库扫描时间',
  `collect_out_network_code` string COMMENT '出库网点编码',
  `collect_out_time` string COMMENT '出库扫描时间',
  `terminal_type` string COMMENT '对接终端类型 驿站or柜机',
  `terminal_source` string COMMENT '对接终端来源 快宝驿站、丰巢等',
  `terminal_name` string COMMENT '对接终端名称、地址等',
  `deliver_out_network_code` string COMMENT '快件取出网点编码',
  `deliver_out_time` string COMMENT '快件取出扫描时间',
  `sign_network_code` string COMMENT '快件签收网点编码',
  `sign_time` string COMMENT '快件签收扫描时间',
  `is_intercept` int COMMENT '是否拦截件 注：1 是 2 否',
  `intercept_registration_time` string COMMENT '拦截件登记时间',
  `is_reback_transfer` int COMMENT '是否退回转寄件 注：1 是 2 否',
  `reback_transfer_apply_time` string COMMENT '退回转寄件申请时间',
  `is_end_piece` int COMMENT '是否是结件 注：1 是 2 否',
  `end_time` string COMMENT '完结时间',
  `is_difficult` int COMMENT '是否问题件 注：1 是 2 否',
  `difficult_time` string COMMENT '问题件扫描时间',
  `difficult_type` string COMMENT '问题件类型',
  `is_reject_reback_transfer` int COMMENT '是否剔除退回转寄件 注：1 是 2 否',
  `effective_plan_sign_time` string COMMENT '无乡镇加时规划签收时间',
  `end_network_source` string COMMENT '末端网点到件扫描来源',
  `deliver_source` string COMMENT '出仓扫描来源',
  `sign_source` string COMMENT '快件签收扫描来源',
  `difficult_first_type` string COMMENT '问题件一级类型',
  `is_transfer` int COMMENT '是否转邮',
  `third_code` string COMMENT '三段码',
  `center_scan_user_code` string COMMENT '中心扫描员code',
  `site_scan_user_code` string COMMENT '网点扫描员code',
  `site_town_id` string COMMENT '到派一体出仓乡镇ID',
  `deliver_scan_user_code` string COMMENT '新增出仓扫描员code',
  `deliver_check_flag` string COMMENT '新增核算标识',
  `is_arrival_send` string COMMENT '是否到出一体 1是 0否',
  `express_type_code` string COMMENT '产品类型编码',
  `express_type_name` string COMMENT '产品类型名称',
  `is_aging_repeatedly` int COMMENT '是否多次时效')
COMMENT '末端签收全明细表新'
PARTITIONED BY (
  `dt` string COMMENT '时间分区(yyyy-MM-dd) 注：末端中心/集散发件日期')
ROW FORMAT SERDE
  'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
STORED AS INPUTFORMAT
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
OUTPUTFORMAT
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
LOCATION
  '/user/hive/dw/hive/jms_dwd.db/external/dwd_terminal_sign_all_detail_new_dt'
TBLPROPERTIES (
  'bucketing_version'='2',
  'discover.partitions'='false',
  'last_modified_by'='hive',
  'last_modified_time'='1669195959',
  'parquet.column.index.access'='true',
  'spark.sql.create.version'='2.2 or prior',
  'spark.sql.sources.schema.numPartCols'='1',
  'spark.sql.sources.schema.numParts'='3',
  'spark.sql.sources.schema.part.0'='{"type":"struct","fields":[{"name":"billcode","type":"string","nullable":true,"metadata":{"comment":"运单号"}},{"name":"order_source_code","type":"string","nullable":true,"metadata":{"comment":"订单来源编码,注:订单来源原始编码"}},{"name":"order_source_name","type":"string","nullable":true,"metadata":{"comment":"订单来源编码,注:订单来源原始名称"}},{"name":"goods_type_code","type":"string","nullable":true,"metadata":{"comment":"物品类型编码,注:物品类型原始编码"}},{"name":"goods_type_name","type":"string","nullable":true,"metadata":{"comment":"物品类型名称,注:物品类型原始名称"}},{"name":"end_manage_region_code","type":"string","nullable":true,"metadata":{"comment":"末端网点所属管理大区编码"}},{"name":"end_manage_region_name","type":"string","nullable":true,"metadata":{"comment":"末端网点所属管理大区名称"}},{"name":"end_agent_code","type":"string","nullable":true,"metadata":{"comment":"末端网点所属代理区编码"}},{"name":"end_agent_name","type":"string","nullable":true,"metadata":{"comment":"末端网点所属代理区名称"}},{"name":"end_provider_id","type":"integer","nullable":true,"metadata":{"comment":"末端网点所属省份id"}},{"name":"end_provider_name","type":"string","nullable":true,"metadata":{"comment":"末端网点所属省份名称"}},{"name":"end_city_id","type":"integer","nullable":true,"metadata":{"comment":"末端网点所属城市id"}},{"name":"end_city_name","type":"string","nullable":true,"metadata":{"comment":"末端网点所属城市名称"}},{"name":"end_area_id","type":"integer","nullable":true,"metadata":{"comment":"末端网点所属区县id"}},{"name":"end_area_name","type":"string","nullable":true,"metadata":{"comment":"末端网点所属区县名称"}},{"name":"end_franchisee_code","type":"string","nullable":true,"metadata":{"comment":"末端网点所属加盟商编码"}},{"name":"end_franchisee_name","type":"string","nullable":true,"metadata":{"comment":"末端网点所属加盟商名称"}},{"name":"end_center_code","type":"string","nullable":true,"metadata":{"comment":"末端发件中心/集散编码"}},{"name":"end_center_name","type":"string","nullable":true,"metadata":{"comment":"末端发件中心/集散名称"}},{"name":"end_center_send_time","type":"string","nullable":true,"metadata":{"comment":"末端中心/集散发件时间"}},{"name":"send_next_station_code","type":"string","nullable":true,"metadata":{"comment":"末端中心/集散发件下一站编码"}},{"name":"send_next_station_name","type":"string","nullable":true,"metadata":{"comment":"末端中心/集散发件下一站名称"}},{"name":"final_sign_network_code","type":"string","nullable":true,"metadata":{"comment":"规划签收网点编码"}},{"name":"final_sign_network_name","type":"string","nullable":true,"metadata":{"comment":"规划签收网点名称"}},{"name":"final_plan_sign_time","type":"string","nullable":true,"metadata":{"comment":"规划签收时间"}},{"name":"planned_delivery_time","type":"string","nullable":true,"metadata":{"comment":"规划发件时间"}},{"name":"deadline_signing_time","type":"string","nullable":true,"metadata":{"comment":"规划签收截止时间"}},{"name":"span_days_arrive","type":"integer","nullable":true,"metadata":{"comment":"跨越天数-到车"}},{"name":"out_line_day","type":"integer","nullable":true,"metadata":{"comment":"���线衔接跨天"}},{"name":"span_days_shift","type":"integer","nullable":true,"metadata":{"comment":"跨越天数-派件班次"}},{"name":"span_days_sign","type":"integer","nullable":true,"metadata":{"comment":"跨越天数-签收"}},{"name":"special_extra_time","type":"double","nullable":true,"metadata":{"comment":"特殊乡镇加时(天)"}},{"name":"deliver_shift","type":"integer","nullable":true,"metadata":{"comment":"派件派仓班次"}},{"name":"end_network_code","type":"string","nullable":true,"metadata":{"comment":"末端到件网点编码"}},{"name":"end_network_name","type":"string","nullable":true,"metadata":{"comment":"末端到件网点名称"}},{"name":"end_network_arrival_time","type":"string","nullable":true,"metadata":{"comment":"末端网点到件时间"}},{"name":"deliver_network_id","type":"integer","nullable":true,"metadata":{"comment":"出仓网点id"}},{"name":"deliver_network_code","type":"string","nullable":true,"metadata":{"comment":"出仓网点编码"}},{"name":"deliver_network_name","type":"string","nullable":true,"metadata":{"comment":"出仓网点名称"}},{"name":"deliver_time","type":"string","nullable":true,"metadata":{"comment":"出仓时间"}},{"name":"deliver_user_code","type":"string","nullable":true,"metadata":{"comment":"出仓派件员编码"}},{"na',
  'spark.sql.sources.schema.part.1'='me":"final_sign_user_code","type":"string","nullable":true,"metadata":{"comment":"最后签收派件员编码"}},{"name":"final_sign_user_name","type":"string","nullable":true,"metadata":{"comment":"最后签收派件员名称"}},{"name":"deliver_unrecordflag","type":"integer","nullable":true,"metadata":{"comment":"未录单标识"}},{"name":"deliver_township_id","type":"integer","nullable":true,"metadata":{"comment":"出仓乡镇id"}},{"name":"deliver_township_name","type":"string","nullable":true,"metadata":{"comment":"出仓乡镇名称"}},{"name":"aging_sign_network_code","type":"string","nullable":true,"metadata":{"comment":"时效签收网点编码"}},{"name":"aging_sign_network_name","type":"string","nullable":true,"metadata":{"comment":"时效签收网点名称"}},{"name":"aging_sign_time","type":"string","nullable":true,"metadata":{"comment":"时效签收时间"}},{"name":"aging_sign_scan_type","type":"string","nullable":true,"metadata":{"comment":"时效签收扫描类型"}},{"name":"aging_sign_user_code","type":"string","nullable":true,"metadata":{"comment":"时效签收派件员"}},{"name":"aging_sign_pistolid","type":"string","nullable":true,"metadata":{"comment":"时效签收巴枪id 备注:PDD开头是桃花岛其他是自助对接"}},{"name":"is_aging_sign_pdd","type":"integer","nullable":true,"metadata":{"comment":"是否桃花岛认证 1 是 2 否"}},{"name":"actual_sign_network_code","type":"string","nullable":true,"metadata":{"comment":"实际签收网点编码"}},{"name":"actual_sign_network_name","type":"string","nullable":true,"metadata":{"comment":"实际签收网点名称"}},{"name":"actual_sign_time","type":"string","nullable":true,"metadata":{"comment":"实际签收时间"}},{"name":"actual_sign_scan_type","type":"string","nullable":true,"metadata":{"comment":"实际签收扫描类型"}},{"name":"actual_sign_user_code","type":"string","nullable":true,"metadata":{"comment":"实际签收派件员"}},{"name":"proxy_in_network_code","type":"string","nullable":true,"metadata":{"comment":"代理点收入网点编码"}},{"name":"proxy_in_network_name","type":"string","nullable":true,"metadata":{"comment":"代理点收入网点名称"}},{"name":"proxy_in_time","type":"string","nullable":true,"metadata":{"comment":"代理点收入扫描时间"}},{"name":"collect_in_network_code","type":"string","nullable":true,"metadata":{"comment":"入库网点编码"}},{"name":"collect_in_time","type":"string","nullable":true,"metadata":{"comment":"入库扫描时间"}},{"name":"collect_out_network_code","type":"string","nullable":true,"metadata":{"comment":"出库网点编码"}},{"name":"collect_out_time","type":"string","nullable":true,"metadata":{"comment":"出库扫描时间"}},{"name":"terminal_type","type":"string","nullable":true,"metadata":{"comment":"对接终端类型 驿站or柜机"}},{"name":"terminal_source","type":"string","nullable":true,"metadata":{"comment":"对接终端来源 快宝驿站、丰巢等"}},{"name":"terminal_name","type":"string","nullable":true,"metadata":{"comment":"对接终端名称、地址等"}},{"name":"deliver_out_network_code","type":"string","nullable":true,"metadata":{"comment":"快件取出网点编码"}},{"name":"deliver_out_time","type":"string","nullable":true,"metadata":{"comment":"快件取出扫描时间"}},{"name":"sign_network_code","type":"string","nullable":true,"metadata":{"comment":"快件签收网点编码"}},{"name":"sign_time","type":"string","nullable":true,"metadata":{"comment":"快件签收扫描时间"}},{"name":"is_intercept","type":"integer","nullable":true,"metadata":{"comment":"是否拦截件 注：1 是 2 否"}},{"name":"intercept_registration_time","type":"string","nullable":true,"metadata":{"comment":"拦截件登记时间"}},{"name":"is_reback_transfer","type":"integer","nullable":true,"metadata":{"comment":"是否退回转寄件 注：1 是 2 否"}},{"name":"reback_transfer_apply_time","type":"string","nullable":true,"metadata":{"comment":"退回转寄件申请时间"}},{"name":"is_end_piece","type":"integer","nullable":true,"metadata":{"comment":"是否是结件 注：1 是 2 否"}},{"name":"end_time","type":"string","nullable":true,"metadata":{"comment":"完结时间"}},{"name":"is_difficult","type":"integer","nullable":true,"metadata":{"comment":"是否问题件 注：1 是 2 否"}},{"name":"difficult_time","type":"string","nullable":true,"metadata":{"comment":"问题件扫描时间"}},{"name":"difficult_type","type":"string","nullable":true,"metadata":{"comment":"问题件类型"}},{"name":"is_reject_reback_transfer","type":"integer","nullable":true,"metadata":{"comment":"是否剔除退回转寄件 注：',
  'spark.sql.sources.schema.part.2'='1 是 2 否"}},{"name":"effective_plan_sign_time","type":"string","nullable":true,"metadata":{"comment":"无乡镇加时规划签收时间"}},{"name":"end_network_source","type":"string","nullable":true,"metadata":{"comment":"末端网点到件扫描来源"}},{"name":"deliver_source","type":"string","nullable":true,"metadata":{"comment":"出仓扫描来源"}},{"name":"sign_source","type":"string","nullable":true,"metadata":{"comment":"快件签收扫描来源"}},{"name":"difficult_first_type","type":"string","nullable":true,"metadata":{"comment":"问题件一级类型"}},{"name":"is_transfer","type":"integer","nullable":true,"metadata":{"comment":"是否转邮"}},{"name":"third_code","type":"string","nullable":true,"metadata":{"comment":"三段码"}},{"name":"center_scan_user_code","type":"string","nullable":true,"metadata":{"comment":"中心扫描员code"}},{"name":"site_scan_user_code","type":"string","nullable":true,"metadata":{"comment":"网点扫描员code"}},{"name":"site_town_id","type":"string","nullable":true,"metadata":{"comment":"到派一体出仓乡镇ID"}},{"name":"deliver_scan_user_code","type":"string","nullable":true,"metadata":{"comment":"新增出仓扫描员code"}},{"name":"deliver_check_flag","type":"string","nullable":true,"metadata":{"comment":"新增核算标识"}},{"name":"is_arrival_send","type":"string","nullable":true,"metadata":{"comment":"是否到出一体 1是 0否"}},{"name":"express_type_code","type":"string","nullable":true,"metadata":{"comment":"产品类型编码"}},{"name":"express_type_name","type":"string","nullable":true,"metadata":{"comment":"产品类型名称"}},{"name":"is_aging_repeatedly","type":"integer","nullable":true,"metadata":{"comment":"是否多次时效"}},{"name":"dt","type":"string","nullable":true,"metadata":{"comment":"时间分区(yyyy-MM-dd) 注：末端中心/集散发件日期"}}]}',
  'spark.sql.sources.schema.partCol.0'='dt',
  'transient_lastDdlTime'='1669204179')